For availing exemption under Section 54 on sale of a residential house you need to have held the house for a period of more than 24 months from its acquisition and the indexed capital gains are invested for acquiring another residential house within prescribed period